package xyz.wanwanwan.www.hrm.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.wanwanwan.www.hrm.domain.CoursePromotion;
import xyz.wanwanwan.www.hrm.feign.client.CacheFeign;
import xyz.wanwanwan.www.hrm.service.ICoursePromotionService;

import java.util.List;

@RestController
public class CoursePromotionFromRedisController {
    @Autowired
    private ICoursePromotionService coursePromotionService;
    @Autowired
    private CacheFeign cacheFeign;
    @PostMapping("/redis/getList")
    public List<CoursePromotion> selectFromRedis(){
        System.out.println(cacheFeign.getListCoursePromotion().getResultObj());
        return (List<CoursePromotion>)cacheFeign.getListCoursePromotion().getResultObj();
    }
}
